package com.example.springsecuritydemo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.springsecuritydemo.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

/**
 * @ClassName UserMapper
 * @Description TODO
 * @Author Mister-Lu
 * @Date 2021/12/20
 **/

@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Select("select t1.role_desc from ss_role t1,ss_role_user t2,ss_user t3 where t1.role_id=t2.role_id and t2.user_id = t3.user_id and t3.user_name = #{username} ")
    public List<String> selectRoles(String username);
}
